<?php
global $base_dir;
$base_dir='../';

/**** 模块调用*****/
include_once($base_dir."inc/inc_connect.php");		//通用函数包含文件
include_once("index_inc.php");
include_once("func/function.php");
include_once($base_dir."inc/manage.php");			//后台通用包含文件
include_once("api/news_api.php");					//api文件
?>
<?php
//接收参数
if(is_array($_GET))
{
	foreach($_GET as $key => $value)
	{
		$$key=$value;
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$lanmu_name?>-后台管理系统</title>
<link href="../style/common.css" rel="stylesheet" type="text/css" />
<script src="../js/checkform.js" type="text/javascript"></script>
<script type="text/javascript" src="../js/kindeditor/kindeditor.js"></script>

<link href="../js/dq_calendar/dq_calendar.css" rel="stylesheet" type="text/css" />
<script src="../js/dq_calendar/dq_calendar.js" type="text/javascript"></script>

<script language="javascript">
//表单验证
function this_submit()
{
	if(checkform())
	{
		document.f1.submit();
	}
}
</script>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="lanmu_table">
  <tr>
    <td height="30" valign="bottom"><a href="<?=$url_list?>"><span class="lanmu_title"><?=$lanmu_name?></span></a><span class="lanmu_title2">&nbsp;&gt;&nbsp;添加</span></td>
  </tr>
</table>
<form action="<?=$url_act?>" method="post" name="search" enctype="multipart/form-data" onsubmit="return this_submit();">
<table border="0" cellspacing="1" class="margintop30">
  <tr>
    <td width="114" height="25" align="right" class="title01">新闻标题:</td>
    <td width="616" class="list_content1"><label>
      <input name="news_title" type="text" id="news_title" size="40" datatype="Limit" msg="新闻标题不能为空且不得超过100字符" min="1" max="100" bt="1" char="新闻标题"/>
    &nbsp;&nbsp;</label></td>
  </tr>
  <tr>
    <td height="25" align="right" class="title01">新闻副标:</td>
    <td nowrap="nowrap" class="list_content1"><input name="news_title2" type="text" id="news_title22" size="40" datatype="Limit" msg="新闻副标题不得超过100字符" min="0" max="100"/></td>
  </tr>
  <tr>
    <td height="25" align="right" class="title01">链接地址:</td>
    <td nowrap="nowrap" class="list_content1"><input name="news_url" type="text" id="news_url" size="40" require="false" datatype="Url"   msg="非法的Url" /></td>
  </tr>
  <tr>
    <td height="25" align="right" class="title01">新闻类别:</td>
    <td nowrap="nowrap" class="list_content1"><select name="newstype_id" id="newstype_id" bt="1" char="新闻类别">
	<option value="0">--请选择--</option>
<?php
$aryNewsType=getAryNewsType();
if(is_array($aryNewsType))
{
	foreach($aryNewsType as $key => $value)
	{
		if($t->$newstype_id==$key)
		{
			echo "\n".'<option value="'.$key.'" selected>'.$value.'</option>';
		}
		else
		{
			echo "\n".'<option value="'.$key.'">'.$value.'</option>';
		}
	}
}
?>
    </select></td>
  </tr>
  <tr>
    <td height="25" colspan="2" class="list_content1"><label><script type="text/javascript">KE.show({
			id : 'news_content',
			cssPath : './index.css',
			urlType : 'absolute',
			resizeMode: "0"
		});	
</script><textarea name="news_content" id="news_content" char="内容" rows="10" cols="70"></textarea> &nbsp;&nbsp;</label></td>
  </tr>
  <tr>
    <td height="25" align="right" class="title01">新闻关键词:</td>
    <td nowrap="nowrap" class="list_content1"><input name="news_keywords" type="text" id="news_keywords"/>
      (关键词间用“|”隔开)</td>
  </tr>
  <tr>
    <td height="25" align="right" class="title01">新闻描述:</td>
    <td nowrap="nowrap" class="list_content1"><textarea name="news_title3" cols="50" rows="2" datatype="Limit" msg="新闻标题不能为空且不得超过100字符" min="0" max="100"></textarea></td>
  </tr>
  <tr>
    <td height="25" align="right" class="title01">新闻来源:</td>
    <td nowrap="nowrap" class="list_content1"><input name="news_from" type="text" id="news_from"/></td>
  </tr>
  <tr>
    <td height="25" align="right" class="title01">是否可见:</td>
    <td nowrap="nowrap" class="list_content1"><label>
      <input type="radio" name="news_visiable" value="1" />
      是
      <input name="news_visiable" type="radio" value="0" checked="checked" />
      否</label></td>
  </tr>
  <tr>
    <td height="25" align="right" class="title01">是否置顶:</td>
    <td nowrap="nowrap" class="list_content1"><input type="radio" name="news_istop" value="1" />
      是
      <input name="news_istop" type="radio" value="0" checked="checked" />
      否</td>
  </tr>
  <!--<tr>
    <td height="25" align="right" class="title01">语言:</td>
    <td nowrap="nowrap" class="list_content1">
<?
if(is_array($aryLanguage))
{
	foreach($aryLanguage as $key => $value)
	{
		if($key==1)
		{
			echo '<input type="radio" name="language" value="'.$key.'"  checked/>'.$value.' ';
		}
		else
		{
			echo '<input type="radio" name="language" value="'.$key.'" />'.$value.' ';
		}
	}
}
?>	</td>
  </tr>-->
  <tr>
    <td height="25" align="right" class="title01">新闻题图:</td>
    <td nowrap="nowrap" class="list_content1">网络地址:
      <input name="news_img" type="text" id="news_img" size="40"/>
        <br />
      本地上传:
      <input name="upfile" type="file" id="upfile" /></td>
  </tr>
  <tr>
    <td height="25" colspan="2" align="center" class="list_content1">
      <input type="submit" name="Submit2" value="提交" />
      &nbsp;&nbsp;
      <input name="reset" type="reset" value="重填" />
	  <input name="news_creattime" type="hidden" id="news_creattime" value="<?=time()?>" />
      <input name="act" type="hidden" id="act" value="save" />    </td>
  </tr>
</table>
</form>
<!-- 7caihu.com Baidu tongji analytics -->
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");

document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fb8797ecb21d1ccb839c35b190277a0cd' type='text/javascript'%3E%3C/script%3E"));

</script>
</body>
</html>
<?php
include_once($base_dir."inc/inc_unconnect.php")
?>